package jee.boot.common.basic;

import jee.boot.common.annotation.DatabaseTime;
/**
 * 字段对应关系
 */
public class AttrField {
    private boolean ignoreAlias = false;//忽略别名(就是忽略"a.name"中 "a.")
    private String field; // 属性(java)
    private String column; // 列(数据库)
    private Object data; //数据
    private DatabaseTime.Operate[] operates;//使用数据库时间的操作

    public AttrField(String field, String column, Object data) {
        this.field = field;
        this.column = column;
        this.data = data;
    }

    public AttrField(boolean ignoreAlias, String field, String column, Object data) {
        this.ignoreAlias = ignoreAlias;
        this.field = field;
        this.column = column;
        this.data = data;
    }

    public boolean isIgnoreAlias() {
        return ignoreAlias;
    }

    public void setIgnoreAlias(boolean ignoreAlias) {
        this.ignoreAlias = ignoreAlias;
    }

    public String getField() {
        return field;
    }

    public void setField(String field) {
        this.field = field;
    }

    public String getColumn() {
        return column;
    }

    public void setColumn(String column) {
        this.column = column;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public DatabaseTime.Operate[] getOperates() {
        return operates;
    }

    public void setOperates(DatabaseTime.Operate[] operates) {
        this.operates = operates;
    }

    @Override
    public String toString() {
        return "field=" + field + ";column=" + column + ";data=" + data + "\r\n";
    }
}
